home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / DSUTIL12 / ATINTVEC / ATINTVEC.PAS < prev   
Pascal/Delphi Source File  |  1993-09-20  |  20KB  |  567 lines

  1. {-----------------------------------------------------------------------}
  2. { PROJECT        NON-PROFIT HIGH QUALITY PROFESSIONAL SOFTWARE,  }
  3. {            AVAILABLE FOR ALL WORLD                }
  4. { LIBRARY        SYSTEM UTILITIES                                }
  5. { MODULE        AT_INTERRUPT_VECTOR_TABLE_DUMP                  }
  6. { FILE NAME        ATINTVEC.PAS                    }
  7. { PURPOSE        Build the PC/AT ROM BIOS Interrupt Vector Table }
  8. {                       (Ints 00h-1Fh,70h-77h,02h,05h)                  }
  9. { VERSION        1.10                        }
  10. { DATE            20-Sep-93                    }
  11. { DESIGN        Dmitry Stefankov                }
  12. { IMPLEMENTATION    Dmitry Stefankov                 }
  13. { COMPANY        Freelance Software Engineer            }
  14. { ADDRESS        Isakowskogo str, 4-2-30                }
  15. {            Moscow, 123181                    }
  16. {            USSR                        }
  17. {            Tel. 007 (095) 944-6304                }
  18. { COPYRIGHT NOTICE    Copyright (C) 1987-1993, Dmitry Stefankov    }
  19. { RESTRICTED RIGHTS    AVAILABLE ONLY FOR FREE DISTRIBUTION,           }
  20. {            NOT FOR COMMERCIAL PURPOSE            }
  21. { COMPUTER        IBM PC or compatible                }
  22. { OPERATING SYSTEM    MS/PC-DOS Version 3.30 or higher        }
  23. { COMPILER        Turbo Pascal Version 6.0            }
  24. {                       (Borland International Inc.) or compatible      }
  25. { ASSEMBLY LANGUAGE    Microsoft MASM 5.10 or compatible               }
  26. { LINKER        Turbo Pascal internal                           }
  27. { ARGUMENTS        <infile>     -   input  stream                  }
  28. {                       <outfile>    -   output stream                  }
  29. { RETURN        None                        }
  30. { REQUIRES        None                                            }
  31. { NATURAL LANGUAGE      English Language                                 }
  32. { SPECIAL        Binary file must be exactly 65,536 bytes (64K)    }
  33. { DESCRIPTION        1. Read ROM-image input stream                  }
  34. {                       2. Extract the ROM BIOS vector information      }
  35. {                       3. Write converted output stream                }
  36. { REVISION HISTORY    Dima Stefankov (DS)                }
  37. {               1.00   21-May-93  DS  initilal release        }
  38. {            1.01   04-Jul-93  DS  some corrections        }
  39. {            1.10   20-Sep-93  DS  some style updates    }
  40. {-----------------------------------------------------------------------}
  41.  
  42.  
  43. {*======================= PROGRAM HEADER PART ==========================*}
  44.  
  45. PROGRAM   ATROMBIOSVectorTable;
  46.  
  47.  
  48. {*** other modules ***}
  49. {*USES;*}
  50.  
  51. {** switches for compilation **}
  52. {$M 16384,65536,65536 }   {* memory allocation   *}
  53. {$S-}                  {* stack checking      *}
  54. {$R-}                     {* range checking      *}
  55.  
  56.  
  57. {*========================== CONSTANTS PART ============================*}
  58.  
  59. CONST
  60.      asPurpose                  =       'ATROMIntVecTbl Builder';
  61.      asVersion                  =       '1.10';
  62.      asAuthor                   =       'Dima Stefankov';
  63.      asCopyright                =       'Copyright (c) 1987, 1993';
  64.      asProgramPrompt            =       'ATVecTbl: ';
  65.      asProgram            =    'ATVecTbl';
  66.      asProgramU            =    'ATVECTBL';
  67.  
  68.    { exit codes }
  69.      errTerminateOK             =     0;
  70.      errBadParmsNumber          =     1;
  71.      errSourceNotFound          =     2;
  72.      errDestDontWrite           =     3;
  73.      errSameNames               =     4;
  74.      errSrcOpenFailed           =     6;
  75.      errDestCreateFailed        =     7;
  76.      errInsufficientMemory      =     8;
  77.      errReadSource              =     9;
  78.  
  79.    { miscellaneous }
  80.      achDosExtMark              =     '.';
  81.      asBlankStr                 =     '';
  82.      asSpaces5                  =     '     ';
  83.      asInDefExt                 =     'bin';
  84.      asOutDefExt                =     'int';
  85.  
  86.    { ASCII characters }
  87.      achNULL                    =     #0;
  88.      achHTAB                    =     #9;
  89.      achCR                      =     #13;
  90.      achBlank                   =     ' ';
  91.  
  92.      achYes                     =     'Y';
  93.      achNo                      =     'N';
  94.  
  95.    { spaces strings }
  96.      asSpace2                   =       achBlank+achBlank;
  97.      asSpace4                   =       asSpace2+asSpace2;
  98.      asSpace6                   =       asSpace4+asSpace2;
  99.      asSpace8                   =       asSpace6+asSpace2;
  100.  
  101.    { number base conversion }
  102.      aHexRadix                  =     16;
  103.      achHexPrefix               =     '$';
  104.  
  105.    { default values }
  106.      aDefBaseNumber             =     16;
  107.  
  108.    { buffers size }
  109.      aMaxInBufSize              =     65536;          { 64K }
  110.      aMaxInBufSizeDiv2          =     65536 DIV 2;    { 32K }
  111.      aMaxInBufSizeParas         =     65536 SHR 4;    { 64K / 16 }
  112.      aProgramMemory             =     160;            { 128+32 Kb }
  113.  
  114.  
  115.    { IBM AT hard-coded addresses }
  116.      aRomIntVecTableOfs00       =      $FEE3;
  117.      aRomIntVecTableOfs70       =      $FF23;
  118.      aRomIntVecOfs02            =      $E2C3;
  119.      aRomIntVecOfs05            =      $FF54;
  120.  
  121.  
  122. {*==================== TYPE DECLARATIONS PART ==========================*}
  123.  
  124. TYPE
  125.     STR2        =       STRING[2];
  126.     STR4        =       STRING[4];
  127.  
  128.  
  129. {*====================== TYPED CONSTANTS PART ==========================*}
  130.  
  131. CONST
  132.  
  133.     setHexChars              :   SET  OF  System.Char  =  ['0'..'9','A'..'F','a'..'f'];
  134.     setUnusedLeadChars       :   SET  OF  System.Char  =  [achHTAB,achBlank];
  135.  
  136.     gadbFirstIntVecNum00      :   System.Byte           =   $00;     {group 00-1F}
  137.     gadbLastIntVecNum1F       :   System.Byte           =   $1F;
  138.  
  139.     gadbFirstIntVecNum70      :   System.Byte           =   $70;     {group 70-77}
  140.     gadbLastIntVecNum77       :   System.Byte           =   $77;
  141.  
  142.     gadbIntVec02              :   System.Byte           =   $02;     {fixed interrupt}
  143.     gadbIntVec05              :   System.Byte           =   $05;     {fixed interrupt}
  144.  
  145.  
  146. {*=========================== VARIABLES PART ===========================*}
  147.  
  148. VAR
  149.    gfInputStream        :       FILE;
  150.    gsInFileName         :       STRING[80];
  151.  
  152.    gfOutputStream       :       System.Text;
  153.    gfOutputStreamRec    :       FILE  ABSOLUTE  gfOutputStream;
  154.    gsOutFileName        :       STRING[80];
  155.  
  156.    gdwInBufDosSeg       :       System.Word;
  157.    gdwResCount          :       System.Word;
  158.    giErrorCode          :       System.Integer;
  159.    gsTempInput          :       STRING;
  160.  
  161.  
  162. {*=========================== FUNCTIONAL PART ==========================*}
  163.  
  164. FUNCTION  _fnbFileExist(VAR fStruc : FILE; sFileName : STRING) : System.Boolean;
  165. {* Check that file exits. *}
  166. VAR
  167.   bResult  :  System.Boolean;
  168.  
  169. BEGIN
  170.   {** attempt to open the file **}
  171.     System.Assign(fStruc,sFileName);
  172.     {$I-}
  173.     System.Reset(fStruc);
  174.     {$I+}
  175.  
  176.   {** copy the result of last I/O operation **}
  177.     bResult := (System.IOResult = 0);
  178.  
  179.     IF (bResult)
  180.       THEN  System.Close(fStruc);
  181.     {if-then}
  182.  
  183.   _fnbFileExist := bResult;
  184. END; { _fnbFileExist }
  185.  
  186.  
  187. FUNCTION  _fnsForceFileNameExt(sFileName, sDefExt : STRING) : STRING;
  188. {* Add extension for filename if not present. *}
  189. BEGIN
  190.    IF (System.Pos(achDosExtMark,sFileName) = 0)
  191.      THEN sFileName := sFileName + achDosExtMark + sDefExt;
  192.    {if-then}
  193.   _fnsForceFileNameExt := sFileName;
  194. END;
  195. { _fnsForceFileNameExt }
  196.  
  197.  
  198. FUNCTION   _fnchGetFirstChar(sInput : STRING) : System.Char;
  199. {* Returns a first char from string. *}
  200. VAR
  201.   chTemp  :  System.Char;
  202.  
  203. BEGIN
  204.    IF (System.Length(sInput) <> 0)
  205.      THEN  chTemp := sInput[1]
  206.      ELSE  chTemp := achNULL;
  207.    {if-then-else}
  208.   _fnchGetFirstChar := chTemp;
  209. END;
  210. { _fnchGetFirstChar }
  211.  
  212.  
  213.  
  214. FUNCTION  _fnsUpcaseStr(sInput : STRING) : STRING;
  215. {* Make all uppercase. *}
  216. VAR
  217.   dbIndex  :  System.BYTE;
  218.   dbCount  :  System.BYTE;
  219.  
  220. BEGIN
  221.   dbCount := System.Length(sInput);
  222.  
  223.   IF (dbCount <> 0)
  224.     THEN  FOR dbIndex :=  1  TO  dbCount DO
  225.              sInput[dbIndex] := System.Upcase(sInput[dbIndex]);
  226.          {for-to-do}
  227.   {if-then}
  228.  
  229.    _fnsUpcaseStr := sInput;
  230. END; { _fnsUpcaseStr }
  231.  
  232.  
  233. FUNCTION  _fndbHexCharToBin(chIn: System.Char) : System.Byte; assembler;
  234. {* Converts the hexadecimal char to decimal. *}
  235. asm
  236.         mov   al, chIn       { AL = chIn }
  237.         sub   al,'0'         { AL <- AL - '0' }
  238.  
  239.         cmp   al,9           { test for digit }
  240.         jbe   @Done
  241.  
  242.         and   al,11011111b   { make uppercase }
  243.         sub   al,'A'-'9'-1   { AL = 'A'..'F' }
  244.  
  245.       @Done:
  246.                         { AL = function result }
  247. END;
  248.   {asm-end}
  249. { HexCharToDec }
  250.  
  251.  
  252.  
  253. FUNCTION   _fnsByteToHexFmt(dbInput : System.Byte) : STR2;
  254. {* Converts a byte to the hex format number representation. *}
  255. CONST
  256.     dbHexCharTable : ARRAY[0..15] OF System.Char = '0123456789ABCDEF';
  257.  
  258. BEGIN
  259.   _fnsByteToHexFmt := dbHexCharTable[dbInput SHR 4] + dbHexCharTable[dbInput AND $0F];
  260. END;  { _fnsByteToHexFmt }
  261.  
  262.  
  263. FUNCTION   _fnsWordToHexFmt(dwInput : System.Word) : STR4;
  264. {* Converts a word to the hex format number representation. *}
  265. BEGIN
  266.   _fnsWordToHexFmt := _fnsByteToHexFmt(System.Hi(dwInput)) +
  267.                       _fnsByteToHexFmt(System.Lo(dwInput));
  268. END;  { _fnsWordToHexFmt }
  269.  
  270.  
  271.  
  272.  
  273. {*=========================== PROCEDURAL PART ==========================*}
  274.  
  275. PROCEDURE    _CopyrightDisplay;
  276. {* Outputs the copyright notice. *}
  277. BEGIN
  278.      System.WriteLn(asPurpose+
  279.                     '  Version '+
  280.                     asVersion+
  281.                     ', '+
  282.                     asCopyright+
  283.                     '  '+
  284.                     asAuthor);
  285. END;  { _CopyrightDisplay }
  286.  
  287.  
  288. PROCEDURE  _AllocDosMem(VAR dwDosMemSeg : System.Word; dwParas : System.Word);
  289. {* Allocates a memory through DOS service. *}
  290. VAR
  291.   bFuncFail  :  System.Boolean;
  292.  
  293. BEGIN
  294.    bFuncFail := System.True;
  295.    asm
  296.       mov    bx, dwParas                { # of memory paragraphas }
  297.       mov    ah, 48h                    { alloc memory block of given size }
  298.       int    21h                        { call DOS service }
  299.       jc     @Done                      { jump if error occurred }
  300.  
  301.       mov    bFuncFail, System.False    { function ok }
  302.       les    di, dwDosMemSeg            { get TP variable address }
  303.       mov    es:[di], ax                { save DOS block segment }
  304.  
  305.     @Done:
  306.    end;
  307.    {asm-end}
  308.  
  309.    IF  (bFuncFail)
  310.      THEN  BEGIN
  311.        System.WriteLn(asProgramPrompt+'Insufficient memory. Program need about ',
  312.                       aProgramMemory,' Kbytes');
  313.        System.Halt(errInsufficientMemory);
  314.            END;
  315.    {if-then}
  316. END;
  317. { _AllocDosMem }
  318.  
  319.  
  320. PROCEDURE  _DeAllocDosMem(dwDosMemSeg : System.Word);
  321. {* Freezes a memory through DOS service. *}
  322. VAR
  323.   bFuncFail  :  System.Boolean;
  324.  
  325. BEGIN
  326.    asm
  327.       mov    es, dwDosMemSeg            { memory block address }
  328.       mov    ah, 49h                    { free memory block }
  329.       int    21h                        { call DOS service }
  330.    end;
  331.    {asm-end}
  332. END;
  333. { _DeAllocDosMem }
  334.  
  335.  
  336. PROCEDURE  _DisplayIntVectorsInfo(dwTableOfs : System.Word;
  337.                                   dbFirstIntVecNum, dbLastIntVecNum : System.Byte;
  338.                                   bUseTableEntry : System.Boolean);
  339. {* Display info about each requested interrupt vector. *}
  340. VAR
  341.   dwMemOfs      :       System.Word;
  342.   dwActualOfs   :       System.Word;
  343.   dwIBMentry    :       System.Word;
  344.   dwTempOfs     :       System.Word;
  345.   sTempInput    :       STRING;
  346.   dbIndex       :       System.Byte;
  347.   dbTestOpCode  :       System.Byte;
  348.  
  349. BEGIN
  350.     FOR  dbIndex := dbFirstIntVecNum  TO  dbLastIntVecNum DO
  351.     BEGIN
  352.        sTempInput := asBlankStr;
  353.        dwMemOfs := dwTableOfs;
  354.        IF  (bUseTableEntry)
  355.          THEN  dwTempOfs := System.MemW[gdwInBufDosSeg:dwMemOfs]
  356.          ELSE  dwTempOfs := dwTableOfs;
  357.        {if-then-else}
  358.        dwActualOfs := dwTempOfs;
  359.        IF  (dwTempOfs <= $FFF0)
  360.          THEN  BEGIN
  361.             dbTestOpCode := System.Mem[gdwInBufDosSeg:dwTempOfs];
  362.             CASE  dbTestOpCode  OF
  363.                       $E9  :  BEGIN
  364.                                  FOR  dwActualOfs := 0  TO  2  DO
  365.                                     sTempInput := sTempInput +
  366.                                                   _fnsByteToHexFmt(Mem[gdwInBufDosSeg:(dwTempOfs+dwActualOfs)])+
  367.                                                   achBlank;
  368.                                  {fo-to-do}
  369.                                  dwActualOfs := System.Word(System.LongInt(dwTempOfs+3) +
  370.                                                  (System.LongInt(MemW[gdwInBufDosSeg:(dwTempOfs+1)])));
  371.                               END;
  372.                       $EA  :  BEGIN
  373.                                  FOR  dwActualOfs := 0  TO  4  DO
  374.                                     sTempInput := sTempInput +
  375.                                                   _fnsByteToHexFmt(Mem[gdwInBufDosSeg:(dwTempOfs+dwActualOfs)])+
  376.                                                   achBlank;
  377.                                  {fo-to-do}
  378.                               END;
  379.                       $EB  :  BEGIN
  380.                                  FOR  dwActualOfs := 0  TO  1  DO
  381.                                     sTempInput := sTempInput +
  382.                                                   _fnsByteToHexFmt(Mem[gdwInBufDosSeg:(dwTempOfs+dwActualOfs)])+
  383.                                                   achBlank;
  384.                                  {fo-to-do}
  385.                                  dwActualOfs := System.Word(System.LongInt(dwTempOfs+2) +
  386.                                                  (System.LongInt(Mem[gdwInBufDosSeg:(dwTempOfs+1)])));
  387.  
  388.                               END;
  389.                       $CF  :  BEGIN
  390.                                  FOR  dwActualOfs := 0  TO  0  DO
  391.                                     sTempInput := sTempInput +
  392.                                                   _fnsByteToHexFmt(Mem[gdwInBufDosSeg:(dwTempOfs+dwActualOfs)])+
  393.                                                   achBlank;
  394.                                  {fo-to-do}
  395.                                  dwActualOfs := dwTempOfs;
  396.                               END;
  397.             ELSE
  398.               {* reserved *}
  399.             END;
  400.             {case-of}
  401.                END;
  402.        {if-then}
  403.        IF  (bUseTableEntry)
  404.           THEN  dwIBMentry := System.MemW[gdwInBufDosSeg:dwMemOfs]
  405.           ELSE  dwIBMentry := dwMemOfs;
  406.        {if-then-else}
  407.        System.WriteLn(gfOutputStream,
  408.                       asSpace2+
  409.                       achBlank+
  410.                       _fnsByteToHexFmt(dbIndex)+
  411.                       achBlank+
  412.                       asSpace4+
  413.                       achBlank+
  414.                       _fnsWordToHexFmt(dwIBMentry)+
  415.                       achBlank+
  416.                       asSpace4+
  417.                       achBlank+
  418.                       _fnsWordToHexFmt(dwActualOfs)+
  419.                       achBlank+
  420.                       asSpace4+
  421.                       sTempInput);
  422.        System.Inc(dwTableOfs,2);
  423.     END;
  424.     {for-to-do}
  425. END;
  426. { _DisplayIntVectorsInfo }
  427.  
  428.  
  429.  
  430. {*============================== MAIN PART =============================*}
  431.  
  432. BEGIN
  433.   _CopyrightDisplay;
  434.  
  435.      IF (System.ParamCount < 2) THEN
  436.      BEGIN
  437.           System.WriteLn(asProgramPrompt+'  help screen for you.');
  438.           System.WriteLn('Usage: infile outfile');
  439.           System.WriteLn(' infile   - source filename                   (default extension='+asInDefExt+')');
  440.           System.WriteLn(' outfile  - destination filename              (default extension='+asOutDefExt+')');
  441.           System.Halt(errBadParmsNumber);
  442.      END;
  443.      {if-then}
  444.  
  445.  
  446.   {** copy the parameters from command line **}
  447.     gsInFileName  := _fnsUpcaseStr(System.ParamStr(1));
  448.     gsInFileName := _fnsForceFileNameExt(gsInFileName,asInDefExt);
  449.  
  450.     gsOutFileName := _fnsUpcaseStr(System.ParamStr(2));
  451.     gsOutFileName := _fnsForceFileNameExt(gsOutFileName,asOutDefExt);
  452.  
  453.  
  454.   {* may be same names? *}
  455.     IF (gsInFileName = gsOutFileName)  THEN
  456.     BEGIN
  457.       System.WriteLn(asProgramPrompt+'  Unable to use same file as input and as output');
  458.       System.Halt(errSameNames);
  459.     END;
  460.     {if-then}
  461.  
  462.  
  463.   {** source file exists? **}
  464.     IF  NOT(_fnbFileExist(gfInputStream,gsInFileName)) THEN
  465.     BEGIN
  466.       System.WriteLn(asProgramPrompt+' Unable to open file '+gsInFileName);
  467.       System.Halt(errSourceNotFound);
  468.     END;
  469.     {if-then}
  470.  
  471.  
  472.   {** destination file present? **}
  473.   IF (_fnbFileExist(gfOutputStreamRec,gsOutFileName)) THEN
  474.   BEGIN
  475.     System.Write(asProgramPrompt+' Output file '+gsOutFileName+
  476.                  ' already exists. Overwrite? (n/y): ');
  477.     System.ReadLn(gsTempInput);
  478.     IF (System.UpCase(_fnchGetFirstChar(gsTempInput)) <> achYes)
  479.       THEN  System.Halt(errDestDontWrite);
  480.     {if-then}
  481.   END;
  482.   {if-then}
  483.  
  484.  
  485.   {** open the source file **}
  486.     System.Assign(gfInputStream,gsInFileName);
  487.     {$I-}
  488.     System.Reset(gfInputStream,1);
  489.     {$I+}
  490.  
  491.     IF  (System.IoResult <> 0) THEN
  492.     BEGIN
  493.       System.Write(asProgramPrompt+' Unable to open '+gsInFileName);
  494.       System.Halt(errSrcOpenFailed);
  495.     END;
  496.     {if-then}
  497.  
  498.  
  499.   {** ask memory from DOS **}
  500.    _AllocDosMem(gdwInBufDosSeg,aMaxInBufSizeParas);
  501.  
  502.  
  503.   {** read  binary image for ROM BIOS **}
  504.     System.WriteLn(asProgramPrompt+' read binary image (1st part).');
  505.     System.BlockRead(gfInputStream,System.Mem[gdwInBufDosSeg:0],aMaxInBufSizeDiv2,gdwResCount);
  506.     IF  (gdwResCount <> aMaxInBufSizeDiv2)
  507.       THEN  BEGIN
  508.          System.WriteLn(asProgramPrompt+' Unable to read 1st part from '+gsInFileName);
  509.          System.Halt(errReadSource);
  510.             END;
  511.     {if-then}
  512.     System.WriteLn(asProgramPrompt+' read binary image (2nd part).');
  513.     System.BlockRead(gfInputStream,System.Mem[gdwInBufDosSeg:aMaxInBufSizeDiv2],aMaxInBufSizeDiv2,gdwResCount);
  514.     IF  (gdwResCount <> aMaxInBufSizeDiv2)
  515.       THEN  BEGIN
  516.          System.WriteLn(asProgramPrompt+' Unable to read 2nd part from '+gsInFileName);
  517.          System.Halt(errReadSource);
  518.             END;
  519.     {if-then}
  520.  
  521.  
  522.   {** create the destination file **}
  523.     System.Assign(gfOutputStream,gsOutFileName);
  524.     {$I-}
  525.     System.Rewrite(gfOutputStream);
  526.     {$I+}
  527.  
  528.     IF  (System.IoResult <> 0) THEN
  529.     BEGIN
  530.       System.WriteLn(asProgramPrompt+' Unable to create '+gsOutFileName);
  531.       System.Halt(errDestCreateFailed);
  532.     END;
  533.     {if-then}
  534.  
  535.  
  536.   {** output a header **}
  537.     System.WriteLn(gfOutputStream);
  538.     System.WriteLn(gfOutputStream,';**  SOURCE FILE:  '+gsInFileName);
  539.     System.WriteLn(gfOutputStream,';**  Created by '+asProgram+' utility, '+asCopyright+'  '+asAuthor);
  540.     System.WriteLn(gfOutputStream);
  541.  
  542.   {** output info about each interrupt vector **}
  543.     System.WriteLn(gfOutputStream,asSpace2+'Int#'+asSpace4+'IBMROM'+asSpace4+'Actual'+asSpace4+'Comments');
  544.     System.WriteLn(gfOutputStream,asSpace2+'----'+asSpace4+'------'+asSpace4+'------'+asSpace4+'--------');
  545.  
  546.     _DisplayIntVectorsInfo(aRomIntVecTableOfs00,gadbFirstIntVecNum00,gadbLastIntVecNum1F,System.True);
  547.     System.WriteLn(gfOutputStream);
  548.     _DisplayIntVectorsInfo(aRomIntVecTableOfs70,gadbFirstIntVecNum70,gadbLastIntVecNum77,System.True);
  549.     System.WriteLn(gfOutputStream);
  550.     _DisplayIntVectorsInfo(aRomIntVecOfs02,gadbIntVec02,gadbIntVec02,System.False);
  551.     _DisplayIntVectorsInfo(aRomIntVecOfs05,gadbIntVec05,gadbIntVec05,System.False);
  552.  
  553.  
  554.   {** free all memory from DOS **}
  555.    _DeAllocDosMem(gdwInBufDosSeg);
  556.  
  557.  
  558.   {** close all files **}
  559.     System.Close(gfInputStream);
  560.     System.Close(gfOutputStream);
  561.  
  562.   {** report all done **}
  563.     System.WriteLn(asProgramPrompt+' Done.');
  564.  
  565.   {* System.Halt(errTerminateOk); *}
  566. END.
  567.